package com.fzhucc.modules.lesson.rest;

import com.fzhucc.annotation.Log;
import com.fzhucc.modules.lesson.domain.dto.LessonDoLabelDto;
import com.fzhucc.modules.lesson.service.LessonLabelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* @author yyg
* @date 2022-12-07
**/
@RestController
@RequiredArgsConstructor
@Api(tags = "课程:标签管理")
@RequestMapping("/api/lessonLabel")
public class LessonLabelController {

    private final LessonLabelService lessonLabelService;

    @PostMapping(value = "/doLessonLabel")
    @Log("课程赋予课程标签")
    @ApiOperation("课程赋予课程标签")
    public ResponseEntity<Object> doLessonLabel(@RequestBody LessonDoLabelDto lessonDoLabelDto){
        lessonLabelService.doLessonLabel(lessonDoLabelDto);
        return new ResponseEntity<>(HttpStatus.OK);
    }
}